

import re
import urllib

import urllib.parse
# urllib.parse.unquote(u)

a1=[]
with open("http.pcapng","rb") as f:
    for i in f.readlines():
        tmp=urllib.parse.unquote(i.strip())
        if "BIoz" in tmp or "Content-Length" in tmp :
            a1.append(tmp)

a2=[]
for i in range(len(a1)):
    if "flag" in a1[i]:
        a2.append(a1[i]+a1[i+1])

a3={}
for i in a2:
    f=re.search(r"(\d+),1\)\)>(\d+) AND 'BIoz'='BIoz&Submit=Submit HTTP/1.1Content-Length: (\d+)",i)
    print(f[1],f[2],f[3])
    if f[3]=="5201":
        a3[f[1]]=f[2]
print(a3)

flag=""
for i in range(1,28):
    flag+=chr(int(a3[str(i)]))
    print(flag)